﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web.Security;
using System.Web;
using MyMessenger.Core;

namespace MyMessenger.Web.Services
{
    public class AuthenticationService
    {
        public virtual void SetAuthCookie(User user, bool rememberMe, string cookiePath)
        {
            FormsAuthentication.SetAuthCookie(user.Id.ToString(), rememberMe, cookiePath);
        }

        public virtual void SignOut()
        {
            FormsAuthentication.SignOut();
            HttpContext.Current.Session.Abandon();
        }
    }
}
